import React from 'react';
import ListEmpty from 'atComponents/ListEmpty';
import { Button } from '@teamix/ui';
import { navigate } from 'utils/router';
import intl from '../../../../../../../locale';

export default class EmptyMrs extends React.PureComponent {
  onClick = () => {
    const { pathResource } = window.FORCE;
    navigate(`/${pathResource.fullPath}`);
  };

  render() {
    return (
      <ListEmpty
        fullPage
        content=""
        desc={
          <>
            {intl.get({
              id: 'code-assets.projectMergeRequest.containers.mrEmpty.YouAndYourPartnersCan',
              defaultMessage: '你和同伴可以通过合并请求高效的进行代码评审和变更讨论，',
            })}
            <br />
            {intl.get({
              id: 'code-assets.projectMergeRequest.containers.mrEmpty.EnsureTheQualityOfCode',
              defaultMessage: '保证代码合并质量，快来试试吧',
            })}
          </>
        }
        btns={[
          <Button type="primary" onClick={this.onClick}>
            {intl.get({
              id: 'code-assets.projectMergeRequest.containers.mrEmpty.InitializeARepository',
              defaultMessage: '初始化仓库',
            })}
          </Button>,
        ]}
        image="https://img.alicdn.com/imgextra/i1/O1CN01xH9KLm1TNxmB5KHEq_!!6000000002371-2-tps-560-560.png"
      />
    );
  }
}
